package com.hnhs.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.net.BindException;

@Controller
@RequestMapping("/sec")
public class LoginController {

    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    @RequestMapping("/find")
    @ResponseBody
    public String find(){
        return "查询所有用户";
    }
    @RequestMapping(path = "/add",method = RequestMethod.POST)
    @ResponseBody
    public String add(){
        return "添加用户";
    }
}
